﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
  public  class FixincomesecuritiesAmortizeDetailRepo  : BaseRepository<FixincomesecuritiesAmortizeDetail, int>
    {
      public FixincomesecuritiesAmortizeDetailRepo(ISession session)
            : base(session)
        {
        }

       public List<FixincomesecuritiesAmortizeDetail> GetByAmortizeHeaderID(int headerID)
       {
           return _session.QueryOver<FixincomesecuritiesAmortizeDetail>()
                          .Where(x => x.FixincomesecuritiesAmortizeHeaderID == headerID).OrderBy(x=>x.Period).Asc.List().ToList();
       }
    }
}
